package graph.net.commands;

import graph.net.internal.ServiceLocator;

public class AddTestDataCommand extends AbstractGraphCommand
{
    public AddTestDataCommand(ServiceLocator serviceLocator)
    {
        super(serviceLocator);
    }
    
    @Override
    public String execute(String[] parameters) throws InvalidCommandFormatException, InvalidCommandException,
            IllegalArgumentException
    {
        serviceLocator.getGraphService().addEdge('A', 'B', 5);
        serviceLocator.getGraphService().addEdge('B', 'C', 4);
        serviceLocator.getGraphService().addEdge('C', 'D', 8);
        serviceLocator.getGraphService().addEdge('D', 'C', 8);
        serviceLocator.getGraphService().addEdge('D', 'E', 6);
        serviceLocator.getGraphService().addEdge('A', 'D', 5);
        serviceLocator.getGraphService().addEdge('C', 'E', 2);
        serviceLocator.getGraphService().addEdge('E', 'B', 3);
        serviceLocator.getGraphService().addEdge('A', 'E', 7);
        
        return "Test data added.";
    }

}
